package com.ym.b2b.tags.base;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.jsp.PageContext;
import javax.servlet.jsp.tagext.Tag;
import javax.servlet.jsp.tagext.TagSupport;

/*** 合法的返回值是EVAL_BODY_INCLUDE与SKIP_BODY,前者表示将显示标签间的文字，后者表示不显示标签间的文字； ******/

public class BaseTag extends TagSupport {

    private static final long    serialVersionUID    = -8664046123152393056L;
    private Tag                  parent;
    private PageContext          pageContext;

    private String               outResponseAttrName = "ret";
    protected HttpServletRequest req;

    public PageContext getPageContext() {
        return pageContext;
    }

    public void setPageContext(PageContext pageContext) {
        this.pageContext = pageContext;
    }

    public Tag getParent() {
        return parent;

    }

    public void setParent(Tag parent) {
        this.parent = parent;
    }

    public String getOutResponseAttrName() {
        return outResponseAttrName;
    }

    public void setOutResponseAttrName(String outResponseAttrName) {
        this.outResponseAttrName = outResponseAttrName;
    }

    public HttpServletRequest getReq() {
        return (HttpServletRequest) getPageContext().getRequest();
    }

    public void setReq(HttpServletRequest req) {
        this.req = req;
    }

}
